<extend name="Public/base"/>
<block name="content">
  <div class="admin-content">
    <div class="admin-content-body">
      <div class="am-cf am-padding am-padding-bottom-0">
        <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">奖金明细</strong>  <small></small></div>
      </div>

      <hr>

      <form class="am-g" action="{:U('')}" method="get">

        <!--<div class="am-u-sm-12 am-u-md-2">-->
          <!--<input type="text" class="am-form-field" name="start_time" data-am-datepicker="{format: 'yyyy-mm-dd ', viewMode: 'years', minViewMode: 'days'}" placeholder="注册开始时间" data-am-datepicker readonly/>-->
        <!--</div>-->
        <!--<div class="am-u-sm-12 am-u-md-2">-->
          <!--<input type="text" class="am-form-field" name="end_time" data-am-datepicker="{format: 'yyyy-mm-dd ', viewMode: 'years', minViewMode: 'days'}" placeholder="注册结束时间" data-am-datepicker readonly/>-->
        <!--</div>-->


        <div class="am-u-sm-12 am-u-md-2">
          <input type="text" class="am-form-field" name="start_time"  value="{$start_time}" placeholder="开始时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',readOnly:true})" readonly/>
        </div>
        <div class="am-u-sm-12 am-u-md-2">
          <input type="text" class="am-form-field" name="end_time"  value="{$end_time}" placeholder="结束时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',readOnly:true})" readonly/>
        </div>

        <select name="coin" id="">
          <option value="" <if condition="$coin eq ''">selected</if>>币种类型</option>
          <option value="1" <if condition="$coin eq '1'">selected</if>>SWEET</option>
          <option value="1" <if condition="$coin eq '2'">selected</if>>DACM</option>
          <option value="8" <if condition="$coin eq '8'">selected</if>>USDT</option>
        </select>

        <!--<select name="reward_type" id="">-->
          <!--<option value="" <if condition="$reward_type eq ''">selected</if>>全部</option>-->
          <!--<option value="1" <if condition="$reward_type eq '1'">selected</if>>闪兑</option>-->
          <!--<option value="2" <if condition="$reward_type eq '2'">selected</if>>转账</option>-->
          <!--<option value="3" <if condition="$reward_type eq '3'">selected</if>>存币</option>-->
          <!--<option value="4" <if condition="$reward_type eq '4'">selected</if>>存币利息</option>-->
          <!--<option value="5" <if condition="$reward_type eq '5'">selected</if>>首存</option>-->
          <!--<option value="6" <if condition="$reward_type eq '6'">selected</if>>等级收益</option>-->
          <!--<option value="7" <if condition="$reward_type eq '7'">selected</if>>节点/全球收益</option>-->
        <!--</select>-->


        <div class="am-u-sm-12 am-u-md-2">
          <div class="am-form-group">
            <php>
              $rw = C('reward_type');
            </php>
            <!--<select data-am-selected="{btnSize: 'sm'}" name="reward_type">-->
              <!--<option value="0">奖金类型</option>-->

              <!--<volist name="rw" id="vo">-->
                <!--<option value="{$key}">{$vo}</option>-->

              <!--</volist>-->

            <!--</select>-->
          </div>
        </div>
        <div class="am-u-sm-12 am-u-md-3">
          <div class="am-input-group am-input-group-sm">
            <input type="text" class="am-form-field" name="username" placeholder="用户名精确查找" value="{$username}">
          </div>
        </div>



        <div class="am-u-sm-12 am-u-md-2">
          <div class="am-input-group am-input-group-sm">
            <input class="am-btn am-btn-primary" value="搜索" type="submit"/>

            <input class="am-btn am-btn-primary" value="导出" type="submit" id="export" style="    margin-left: 5px"/>
          <!--</span>-->
          </div>
        </div>




      </form>

      <div class="am-g">
        <div class="am-u-sm-12">
          <div class="am-form">
            <table class="am-table am-table-striped am-table-hover table-main">
              <thead>
              <tr>
                <th>序号</th>
                <th class="table-title">用户名</th>
                <th class="table-title">提供人</th>
                <th class="table-title">类型</th>
                <th class="table-date am-hide-sm-only">数量</th>
                <!--<th class="table-date am-hide-sm-only">类型</th>-->
                <th class="table-date am-hide-sm-only">备注</th>
                <th class="table-date am-hide-sm-only">时间</th>
              </tr>
              </thead>
              <tbody>
              <php>
                $reward_type = C('reward_type');
                $type = C('account_type');
                $level=C('leader');
                $agent=C('agent_level');
              </php>
              <volist name="list" id="vo">
                <tr>
                  <td>{$key}</td>
                  <td>{$vo['username']}</td>
                  <td>{$vo['from_id']}</td>
                  <td>
                    <if condition="$vo.type eq 1 or $vo.type eq 8">
                      {$type[$vo['type']]}
                      <else />
                      DACM
                    </if>
                  </td>
                  <td class="am-hide-sm-only">{$vo['amount']}</td>
                  <!--<td class="am-hide-sm-only">{$reward_type[$vo['reward_type']]}</td>-->
                  <td class="am-hide-sm-only">
                    <if condition="$vo.type eq 9">
                      {$level[$vo['flag_cha']]}{$vo['tips']}
                      <elseif condition="$vo.type eq 10"/>
                      {$agent[$vo['flag_cha']]}{$vo['tips']}
                      <else />
                      {$vo['tips']}
                    </if>
                  </td>
                  <td>{$vo['create_time']|date="Y-m-d H:i:s",###}</td>
                </tr>
              </volist>
              </tbody>
            </table>
            <div class="am-cf">
              共 {$count} 条记录
              <div class="am-fr">
                <ul class="am-pagination">
                  {$page}
                </ul>
              </div>
            </div>
            <hr />
          </>
        </div>

      </div>
    </div>
  </div>

</block>

<block name="js">
  <script>
    $(function () {
        var url = "{:U('activeUser')}";
        $('.useractive').click(function () {
            $.post(url,{user_id:$(this).attr('user_id')},function (data) {
                layer.msg(data.msg,{time:1000},function () {
                    if(data.code){
                        return false;
                    }else{
                        window.location.href=data.data;
                    }
                })
            },'json')
        })
    })
  </script>
</block>

<block name="js">
  <script>
    var exporturl = "{:U('export_detail')}";
    $('#export').click(function () {
      $('form').attr('action',exporturl);
    });

  </script>
</block>